<template>
  <el-form ref="formRef" v-bind="$attrs">
    <slot />
  </el-form>
</template>

<script setup>
import { ref } from 'vue';

defineOptions({
  name: 'AxiomForm'
});

const formRef = ref(null);

// Expose the validate and resetFields methods from the el-form component
defineExpose({
  validate: () => formRef.value?.validate(),
  resetFields: () => formRef.value?.resetFields(),
  scrollToField: (prop) => formRef.value?.scrollToField(prop),
  clearValidate: (props) => formRef.value?.clearValidate(props),
});
</script> 